home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9041 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  952 b 

  1. Path: thor.tu.hac.com!collins
  2. From: collins@thor.tu.hac.com (Ron Collins)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Standard question - pointer initialization
  5. Date: 7 Mar 1996 23:01:41 GMT
  6. Organization: Advanced Depot Systems
  7. Message-ID: <4hnpsl$g8c@hacgate2.hac.com>
  8. References: <4hk9un$906@hammer.msfc.nasa.gov> <4hl6rr$nde@news.xs4all.nl> <313E6028.1C19@ix.netcom.com>
  9. NNTP-Posting-Host: thor.tu.hac.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Norman Bullen (nbullen@ix.netcom.com) wrote:
  13. [snip]
  14.  
  15. : And there is no point in initializing a pointer when its declared if you 
  16. : don't know at that point what an appropriate value might be. Use of a 
  17. : pointer that has been initialized with an inappropriate value can be just 
  18. : as bad for the program as using an uninitialize pointer.
  19.  
  20. The popular convention (when initializing pointers) is to set them to
  21. NULL.  This is the appropriate value to use when checking for invalid
  22. pointer usage.
  23.  
  24.                 -- collins --
  25.